package com.java.inventory.controller;

import com.java.inventory.common.result.CommonResult;
import com.java.inventory.dto.LockInventoryReq;
import com.java.inventory.service.IInventoryService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 库存表 前端控制器
 * </p>
 *
 * @author jobob
 * @since 2022-11-16
 */
@RestController
@RequestMapping("/inventory")
public class InventoryController {

    @Resource
    private IInventoryService iInventoryService;

    @PostMapping("/lockInventory")
    public CommonResult lockInventory(@RequestBody LockInventoryReq lockInventoryReq){
        iInventoryService.lockInventory(lockInventoryReq);
        return new CommonResult();
    }
}
